<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>AdNetWork</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        html, body {
            width: 100%;
            height: 100%;
        }

        .images {
            display: block;
            width: 100%;
            height: 100%;
        }

        .container {
            position: relative;
            width: 100%;
            height: 100%;
        }

        .logo-container {
            display: block;
            position: absolute;
            right: 0;
            top: 0;
            z-index: 65534;
            font-size: 0;
            line-height: 0;
            width: auto;
            height: 16px;
            overflow: hidden;
            background: #b2b2b2;
            background: rgba(0, 0, 0, 0.3);
            opacity: 0.5;
        }

        .logo-container .gap {
            display: inline-block;
            *display: inline;
            *zoom: 1;
            width: 1px;
            height: 10px;
            line-height: 0;
            background-color: #fff;
            opacity: 0.45;
            margin: 3px 0;
        }

        .logo-link {
            display: inline-block;
            *display: inline;
            *zoom: 1;
            width: auto;
            height: 10px;
            margin: 3px 4px;
        }

        .logo-close-img {
            display: inline-block;
            *display: inline;
            *zoom: 1;
            width: auto;
            height: 10px;
            margin: 3px 4px;
        }
    </style>
@stack('styles')
    <!-- jQuery -->
    <script src="{{ H('plugins/components/jquery/dist/jquery.min.js') }}"></script>
    <!--layer -->
    <script src="{{ H('plugins/components/layer/layer.js') }}"></script>
@stack('scripts')
</head>
<body>
<div class="container">
    @yield('content')
    <div class="logo-container">
        <a href="{{ config('adnetwork.union.link') }}" id="logo-container-wrapper" target="_blank">
            <img class="logo-link"
                 src="">
        </a>
        <div class="gap"></div>
        <a href="javascript:void(0);"
           data-element="{{ $request->get('ne') }}"
           data-hidden="hidden-{{ $request->get('data-ad-client') }}-{{ $request->get('data-ad-slot') }}"
           id="logo-close-btn">
            <img class="logo-close-img"
                 src="">
        </a>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        $('#logo-close-btn').click(function () {
            layer.msg('60分钟内不再展示该广告', {
                shift: 2
            });
            window.setTimeout(() => {
                window.parent.postMessage({
                    action: 'hidden',
                    element: $(this).data('element'),
                    hidden: $(this).data('hidden'),
                }, '*');
            }, 2000);
        });
    });
</script>
</body>
</html>
